/**
 *	 defined the main entry program
 *   VisualGroup JavaScript prototype Classes, version draf
 *  (c) 2008 Bill Vison <vison_ruan@126.com>
 *
 *
/*--------------------------------------------------------------------------*/
/**
 * 	defined The Base Exception
 *	that will 
 */
Exception = Ext.extend(Object , {
	message:"",
	name:"Exception",
	value:null,
	constructor:function($message , $name ,$value) {
		Exception.superclass.constructor.apply(this, arguments);
		this.message = $message;
		if ($name != null) {
			this.name = $name;
		} 
		this.value = $value;
	},
	getName:function() {
		return this.name;
	},
	getValue:function() {
		return this.value;
	},
	getMessage:function() {
		return this.message;
	},
	/**
	 * do not rewrite the message.
	 */
	getLocalMessage:function() {
		var $localMessage = this.name + " occur by : [" + this.message +"]";
		if (this.value != null) {
			$localMessage+=",and reason value is ["+this.value+"]";
		}
		$localMessage+=".";
		return $localMessage;
	}
});
/**
 * defined global exception
 */
Exception.NullObjectException = 2;

Exception.SysException = Ext.extend(Exception,{
	name:"Exception.SysException",
	constructor:function($message , $name ,$value) {
		Exception.SysException.superclass.constructor.apply(this, arguments);
	}
});
Exception.SysException.CreateObjectError = 101;
Exception.SysException.ExecScriptError = 110;

Exception.CommonException = Ext.extend(Exception,{
	name:"Exception.CommonException",
	constructor:function($message , $name ,$value) {
		Exception.CommonException.superclass.constructor.apply(this, arguments);
	}
});

Exception.CommonException.ParamNotNull = 1;
